﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Shared.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <Style TargetType="TextBox" >
        <Setter Property="Background" Value="{StaticResource TextBoxBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource Foreground}"/>
        <Setter Property="CaretBrush" Value="{StaticResource Foreground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource BorderBrushNormal}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Border SnapsToDevicePixels="True"
                            BorderThickness="1"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}">
                        <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                            <ScrollViewer x:Name="PART_ContentHost" Margin="1"/>
                        </Grid>
                    </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" Value="{StaticResource TextBoxBackgroundSelected}"/>
                            </Trigger>
                            <Trigger Property="IsFocused" Value="true">
                                <Setter Property="Background" Value="{StaticResource TextBoxBackgroundSelected}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>